const { DataTypes } = require('../utils/sequelize');

const Teacher = {
  name: "Teacher",
  data: {
    userId: {
      type: DataTypes.STRING,
      allowNull: false,
      primaryKey: true,       //主键
    },
    username: {
      type: DataTypes.STRING,
      allowNull: false,
    },
    password: {
      type: DataTypes.STRING,
      allowNull: false,
    },
    nickname: {
      type: DataTypes.STRING,
      allowNull: false,
    },
    sex: {
      type: DataTypes.NUMBER,
      allowNull: false,
    },
    headUrl: {
      type: DataTypes.STRING,
      allowNull: false,
    },
    telephone: {
      type: DataTypes.NUMBER,
      allowNull: true,
    },
    teacherId: {
      type: DataTypes.STRING,
      allowNull: false
    },
    identity: {
      type: DataTypes.NUMBER,
      allowNull: false
    }
  },
  options: {
      tableName: 'teacher_tb'
  }
}
module.exports = Teacher